Metaforce Components

This document describes the dependencies between different components/libraries related to Metaforce and XDoclet.

Rationale for componentisation

The main reason to split up the current XDoclet2 codebase in several components is reusability. Especially Metaforce and Xbg are very generic frameworks/components that can be useful beyond XDoclet2.

This is typically what has happened in the Struts and WebWork projects, where generic and generally useful parts of the framework have been refactored out and isolated as separate projects.

Further, splitting things up loosens up the dependencies. This means that less libraries will have to be used by a project that uses XDoclet/Metaforce than if everything was in one codebase/jar.

The legend in the upper left corner indicates where the various components will (probably) be hosted.

Components

Summary of each component

  • Metaforce
    • Generic file generation framework
    • Pluggable Metadata (XJavaDoc, Commons SQL, etc.)
    • Pluggable file generator engines
    • Built-in support for the Velocity file generator engine
    • Built-in support for the Jelly file generator engine
    • Plugin support that use pluggable file generators
    • Built-in support for Ant
    • Built-in support for IDEs
    • Dynamic discovery of metadata and plugins (based on Manifest files and BeanInfo classes)
    • Built-in support for packaging of plugins
  • Velocity
    • Generic template engine
  • Jelly
    • XML based template engine
  • Betwixt
    • Java Bean -> XML converter
  • Xbg
    • XML Bean Generator
    • Formerly known as XGG (XML Generator Generator)
    • File generator for Metaforce using Betwixt to write Java Beans as XML
    • JAXB-like code generator (mini-SDK) that generate Java Beans from DTD and XSD grammars
    • Typically used as a base component for XDoclet/Metaforce plugins that generate XML
  • XDoclet
    • Code generation engine
    • Uses the Metaforce framework
    • Uses XJavaDoc to pass meta data to Metaforce
  • XDoclet SDK
    • Software Development Kit for XDoclet
    • Generates @tag documentation from Tag classes
    • Migration tool that generates XJavaDoc Tag classes from legacy xtags.xml files
    • Built-in plugin for generation of Manifest files
    • Built-in plugin for generation of BeanInfo classes
  • XJavaDoc
    • Java source parser similar to QDox and Sun's JavaDoc engine
    • Used as metadata provider by XDoclet
    • Dynamic discovery of custom @tags
  • Plugins
    • Generates one particular file type
    • Plug into the Metaforce framework
    • Extend from Metaforce's built-in Velocity/Jelly plugins or Xbg's Betwixt Plugin
    • Maintained by other projects (JBoss, Struts, Hibernate...)
    • Separate SourceForge project to host plugins that aren't hosted elsewhere (typically plugins for commercial software)